 <template>

	<view >
		<u-popup v-model="isSucess" mode="center" border-radius="40" >
			<view class="contents">
				<view class="titlebg">
					<view style="font-size: 80rpx;">{{title}}</view>
					<view style="font-size: 32rpx;">{{des}}</view>
				</view>
				<view class="bg">
					<view style="padding: 40rpx;line-height: 45rpx;">{{detail}}</view>
				   <view class="" style="margin:0 auto  40rpx auto;text-align: center;width: 200rpx;" v-if="img">
						 <u-image :src="img" width="200" height="200"  v-if="img" shape="circle"></u-image>
					</view>
		 		
					<u-button shape="circle"
					:custom-style="{background:'#FF6450',color:'#fff',marginBottom:'40rpx',width:'400rpx'}" @click="clkbtnTxt">
					{{btnTxt}}</u-button>
					
					<u-button shape="circle" plain="true"  type="primary "
					:custom-style="{color:'#fff',marginBottom:'40rpx',width:'400rpx'}" @click="clkbtnTxt1" v-if="btnTxt2">
					{{btnTxt2}}</u-button>
				</view>
              
			</view>
		</u-popup>
	</view>

</template>

<script>
	export default {
		props: {
			isSucess: {
				type: Boolean,
				default: false,
			},
			btnTxt:{
				type: String,
				default: '',
			},
			btnTxt2:{
				type: String,
				default: '',
			},
			title:{
				type: String,
				default: '',
			},
			des:{
				type: String,
				default: '',
			},
			detail:{
				type: String,
				default: '',
			},
			img:{
				type: String,
				default: '',
			}
		},
		data() {
			return {


			}
		},
		methods:{
			clkbtnTxt(){
				if(this.btnTxt=="抵扣付款"){
				   this.$parent.buy(1)
				}
				
				
				this.$parent.isSucess=false
			
			},
			clkbtnTxt1(){
				if(this.btnTxt2=="直接购买"){
				   this.$parent.buy(0)
				}
				this.$parent.isSucess=false
							
			}
		}
	}
</script>

<style lang="scss" scoped>
	.contents{
		width: 500rpx;

		.titlebg {
			background: #FF6450;
			width: 100%;
			color: #FFFFFF;
			text-align: center;
			padding: 20rpx;
		}
	}

	.bg {
		background-image: url(/static/lihua.png);
		width: 500rpx;
		height: auto;
		padding: 20rpx 40rpx;
		background-size: cover;

		
	}
</style>
